1. Technical Field
The present invention is directed to a mechanism for parsing and matching a uniform resource locator to a rule or resource. More specifically, the present invention is directed to a mechanism for progressively generating a hash of portions of a uniform resource locator and then identifying the hash of the portions within a multidimensional hash table to thereby match the uniform resource locator to a rule or resource.
2. Description of Related Art
Matching of a uniform resource locator (URL) to rules or resources is a fundamental operation performed by server-side components that process URLs. Common URL rule matching applications include the Servlet/Java Server Page (JSP) engine, URL Authenticators, and the like.
Typically, to match a URL to a resource, the URL is decomposed into constituent parts including a scheme portion, a web server name portions, a path portion, and a type portion. For example, the URL http://www.ibm.com/page1.html includes a scheme portion that is “http”, the server name portions would be “com”, “ibm” and “www”, the path portion would be “page1” and the type portion would be “html”. A decomposition tree structure is used to identify the files associated with a URL based on traversing the tree structure using the various components of the URL. Each component of the URL is hashed and its hash code appended to a prior component of the URL to obtain an accumulated URL hash code. Once the final hash code is determined by accumulating the hash codes for the components of the URL, a hash table lookup is performed to identify the files or resources associated with the URL. An example of such a system as described above is provided in U.S. Patent Application Publication No. 2002/0133570 which is hereby incorporated by reference.
It would be beneficial to have an apparatus and method for matching a URL to rules and/or resources that provides increased performance over these known techniques.